﻿CREATE TABLE [dbo].[mnContactsPrincipals] (
    [ContactID]      INT           NOT NULL,
    [PrincipalID]    INT           NOT NULL,
    [FunctionKey]    INT           NULL,
    [JobtitleKey]    INT           NULL,
    [PhoneExtension] NVARCHAR (50) NULL,
    [Fax]            NVARCHAR (50) NULL,
    [Job]            NVARCHAR (50) NULL,
    CONSTRAINT [PK_mnContactsPricipals] PRIMARY KEY CLUSTERED ([ContactID] ASC, [PrincipalID] ASC),
    CONSTRAINT [FK_mnContactsPrincipals_datContacts] FOREIGN KEY ([ContactID]) REFERENCES [dbo].[datContacts] ([ContactID]),
    CONSTRAINT [FK_mnContactsPrincipals_datContacts1] FOREIGN KEY ([PrincipalID]) REFERENCES [dbo].[datContacts] ([ContactID])
);

